import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import './NotFound.css';

function NotFound() {
  const navigate = useNavigate();

  useEffect(() => {
    document.title = '404未找到';
  }, []);

  return (
    <div className="about-page">
      <div className="about-container">
        <h1>404 - 页面未找到</h1>
        <p>抱歉，你访问的页面不存在或已被移除。</p>
        <button onClick={() => navigate('/')} className="back-button">
          返回首页
        </button>
      </div>
    </div>
  );
}

export default NotFound;